'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {

  const { router, controller } = app;
  // api
  router.post('/api/user/register', app.middleware.validator(), controller.user.register);
  router.post('/api/user/isExist', controller.user.isExist);
  router.post('/api/user/login', controller.user.login);
  router.delete('/api/user/delete', app.middleware.loginChecks.loginCheck, controller.user.deleteUser);
};
